--序列化

function serialize( o )
	if type(o)=="number" then
		io.write(o);
		
	elseif type(o)=="string" then
		--todo
		io.write("[[",o,"]]");
	end

end

--保存无环的table
function n_serialize( o )
	if type(o) == "number" then
		io.write(o);
	elseif type(o) =="string" then
		io.write(string.format( "%q",o )) ;
	elseif type(o)=="table" then
		io.write('{');
		for k,v in pairs(o) do
			io.write(" "..k.."=");
			n_serialize(v);
			io.write(',');
		end		
		io.write('}');
	end		
end

str=string.format( "formatstring:%d",1234 );
print(str);
q='a "C:\path\"';
print(string.format( "%q",q ));

print([=[123 %d \ '  '  " "]=]);

table_1={
	a="12",
	b=60,
	c={a=16,b="hello"},
};

n_serialize(table_1);

function fn( ... )
	a=...;
	for v in pair(a) do
		print(v);
	end
	
end